A catch
clause that only rethrows the caught exception has the same effect as omitting the catch
altogether and letting
it bubble up automatically.
try {
doSomething();
} catch (ex) { // Noncompliant
throw ex;
}
Such clauses should either be removed or populated with the appropriate logic.
doSomething();
or
try {
doSomething();
} catch (ex) {
console.err(ex);
throw ex;
}